package com.zxf.android.mobilesafe.engine;

import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;

public class DBCopyService {

	public static void dbFileCopy(InputStream is, File dbFile) throws Exception {
		int len = 0;
		byte[] buffer = new byte[1024];
		FileOutputStream fos = new FileOutputStream(dbFile);
		
		while((len = is.read(buffer)) !=-1) {
			fos.write(buffer, 0, len);
		}
		fos.flush();
		fos.close();
		is.close();
	}

}
